<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>OR Instruction</title>
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1 class="heading">OR Instruction<BR>
</h1>
<hr noshade></h1>
<BR>
<span class="text">The instruction OR performs the logical operation "OR", bit for bit. There are two ways to do this:<BR>
<BR>
1. The source is an effective address, the destination is a data register.<BR>
2. The source is the data register and the destination is the effective address</span>
<br>
<br>          
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
  <TBODY>
    <TR>
      <TD width="25%" rowSpan=2 class="text">ADDRESS METHODS:</TD>
      <TD width="75%" class="text">1) Dn, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l, x(PC), x(PC,xr.s), #x</TD>
    </TR>
    <TR>
      <TD width="75%" class="text">2) (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l</TD>
    </TR>
  </TBODY>
</TABLE>
<P align=left class="text">DATA LENGTH: Byte, word, longword</P>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="62%">
  <TBODY>
    <TR>
      <TD width="23%" rowSpan=5 vAlign=top class="text">FLAGS:</TD>
      <TD width="77%" class="text">X - U</TD>
    </TR>
    <TR>
      <TD width="77%" class="text">N - S</TD>
    </TR>
    <TR>
      <TD width="77%" class="text">Z - S</TD>
    </TR>
    <TR>
      <TD width="77%" class="text">C - 0</TD>
    </TR>
    <TR>
      <TD width="77%"><span class="text">V - 0 </span>
          <P>&nbsp;</P></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="62%">
  <TBODY>
    <TR>
      <TD width="23%" rowSpan=2 class="text">SYNTAX:</TD>
      <TD width="77%" class="text">OR &lt;ea&gt;,Dn</TD>
    </TR>
    <TR>
      <TD width="77%" class="text">OR Dn,&lt;ea&gt;</TD>
    </TR>
  </TBODY>
</TABLE>
<P align=left class="text"><span class="text">EXAMPLE CODE:</span></P>
<P align=left class="sourcecode"><span class="text">&nbsp;&nbsp; OR&nbsp;&nbsp;&nbsp; #%00001111,D0&nbsp;&nbsp;&nbsp; 
 
If D0 contained 11001100,after the or it would contain 11001111</span></P>
<P align=left><span class="text">Use OR to selectively set bits in the 
destination. Each bit in the source operand that is 1 will cause the 
corresponding bit in the destination to be set to 1. Each bit in the source that 
is 0 will leave the corresponding bit in the destination unchanged. For example:</span></P>
<P align=left><span class="text"><font face="Courier New">SOURCE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1111&nbsp;&nbsp;&nbsp; 0101<br>
DESTINATION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0011&nbsp;&nbsp;&nbsp; 
0011<br>
-----------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; 
----<br>
RESULT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1111&nbsp;&nbsp;&nbsp; 0111</font></span></P>
</body>
</html>